Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CXXCBC-639: Allow to build both static and shared libraries #707

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

avsej
Copy link
Member

@avsej avsej commented Jan 14, 2025

To avoid issues with generation of cmake helper scripts the following changes has been made:

  • interface libraries that are used to carry compiler options and flags are declared as IMPORTED to avoid unnecessary INTERFACE_LINK dependencies for the static library

  • jsonsl, asio and couchbase_backtrace libraries are not linked as a targets, but rather as a object files directly. This is also done to avoid announcing them as a transitive dependencies. All these libraries are hidden and never exposed.

  • for other third-party dependencies do not disable install tasks, which generate export files

This patch also removes some unused cmake files (of crypto, sasl and operations/management directories).

Fixes #701

@avsej avsej requested review from thejcfactor and a team January 14, 2025 00:22
To avoid issues with generation of cmake helper scripts the following
changes has been made:

* interface libraries that are used to carry compiler options and flags
  are declared as IMPORTED to avoid unnecessary INTERFACE_LINK
  dependencies for the static library

* jsonsl, asio and couchbase_backtrace libraries are not linked as a
  targets, but rather as a object files directly. This is also done to
  avoid announcing them as a transitive dependencies. All these
  libraries are hidden and never exposed.

* for other third-party dependencies do not disable install tasks, which
  generate export files

This patch also removes some unused cmake files (of crypto, sasl and
operations/management directories).

Fixes couchbase#701
@avsej avsej force-pushed the CXXCBC-639-fix-static-build branch from f462a77 to e6d01ea Compare January 14, 2025 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue building couchbase-cxx-client in static
1 participant